1. Field of the Invention
The present invention relates to an apparatus in which a program execution environment is set for executing predetermined processing (the apparatus hereinbelow will also be referred to as a “program-executing apparatus”); more specifically, the present invention relates to a program-executing apparatus in which two differently configured program execution environments are set, and also to a portable information processing apparatus using the aforementioned program-executing apparatus.
2. Description of the Background Art
Recently, according to the development in computer networks, various applications can be downloaded into a communication terminal and can thereby be used with the terminal. In addition, using Java (registered trademark; and “Java” hereinbelow will be shown as “Java™”) developed by Sun Microsystems, Inc., various JaVa™-compatible applications are thereby abled to be operated by setting a program execution environment in which a platform-independent “virtual machine” is operable (the aforementioned program execution environment hereinbelow will be referred to as a “virtual-machine execution environment”). Particularly, in the field of portable information processing apparatuses such as portable telephones and PDAs, the development has advanced to an extent that apparatuses having functions unavailable with conventional models are used. The functions include, for example, a function in which a virtual-machine execution environment is set to display motion images and to form a complicated user interface.
Generally, a virtual-machine execution environment has a configuration as shown in FIG. 11.
In the figure, numeral 70 denotes an OS (operating system) used as a platform, and numeral 71 denotes an application(s) having a program configuration compatible with the OS 70 (the application hereinbelow will be referred to as an “existing-system dedicated application(s) 71”). In a state where a virtual machine 80 is not built in, the OS 70 sets a program execution environment for operating only the existing-system dedicated application 71 (hereinbelow, the OS 70 in the aforementioned state will be referred to as a “general-purpose OS 70”, and the system for operating only the existing-system dedicated application 71 will be referred to as an “existing system”.)
The virtual machine 80 functions as an OS for operating a Java™-compatible application(s) 81 (shown in the figure as “virtual-machine dedicated application(s) 81”) on the OS 70 of the existing system. Specifically, when the virtual machine 80 is used to perform processing, a command in byte code representing the contents of the processing is passed from the Java™-compatible application 81 to the virtual machine 80, emulation according to the command is performed between the virtual machine 80 and the OS 70, and the processing required by the Java™-compatible application 81 is thereby executed.
The above-mentioned virtual-machine execution environment is of course set with hardware resources, such as a CPU 90 and a memory 91 (corresponding to a ROM 92 and a RAM 93 that are shown in FIG. 12). As shown by arrow-end dotted lines in the figure, the individual applications 71 and 81 share the memory 91 through the OS 70 and the CPU 90.
FIG. 12 shows another system configuration in which a virtual-machine execution environment is set. The software configuration of the system is similar to that shown in FIG. 11. However, the hardware configuration is arranged such that a second CPU 95 is coupled as an accelerator to a CPU 91, and an OS 70 is used to process a command sent from a virtual machine 80, wherein processing is performed by passing the command to the second CPU 95 so that the processing is speeded up. Thus, the virtual-machine execution environment is set with hardware, such as the second CPU 95, the CPU 91, and various devices 94, and the virtual machine 80, as shown in the dotted-line frame in the figure.
As in the conventional configuration, for example, only the existing CPU 91 can handle, for example, a case where only an existing-system dedicated application 71 is operated or a case where the virtual machine 80 performs processing using functions of the existing system.
FIG. 13 shows a third system configuration in which a virtual-machine operation environment is set. The system is configured such that an existing system and a virtual-machine execution environment are individually set with independent hardware resources, and CPUs 91 and 91a are coupled. The hardware configuration of the virtual-machine execution environment (configured of, for example, the CPU 91a, a ROM 92a, a RAM 93a, and devices 94a) is similar to the configuration of the existing system. However, in addition to the functions of the virtual machine 80 shown in FIG. 11 or 12, the software includes a built-in dedicated OS 82 in which other functions are set, including a function of exchanging data with the existing system and a function of controlling the memories and the devices. In a configuration in which the virtual-machine dedicated application 81 uses a function of the existing system, a command is issued between the dedicated OS 82 and the general purpose OS 70 of the existing system. Concurrently, communication is performed therebetween to send the execution result of the processing performed in response to the aforementioned command.
In the system shown in FIG. 11, since the virtual machine 80 is driven according to the emulation of the OS 70, a problem arises in that the execution speed for the virtual-machine dedicated application 81 is decreased. In addition, since the existing-system dedicated application 71 is operated on the same OS 70 that also drives the virtual machine 80, resource competition tends to occur, and influences thereof to the existing-system dedicated application 71 are unavoidable. As such, programs need to be modified. Also in the virtual-machine execution environment, operations such as those for thread management and memory management need to be performed to be compatible with the OS 70. These matters require program modifications, thereby arising problems of increasing costs and time.
Moreover, the same memories and devices are shared between the existing system and the virtual-machine execution environment. As such, when a program such as a hazardous program or a program not sufficiently verified is built thereinto as the virtual-machine dedicated application 81, the whole system can be destructed.
In the system shown in FIG. 12, the second CPU 95 functioning as the accelerator enables the virtual-machine dedicated application 81 to perform high-speed execution. However, a necessity arises for modification of the configuration of the existing CPU 91 in order to connect the second CPU 95. Moreover, also in this system, members such as memories 91 and devices 94 are shared between the existing system and the virtual-machine execution environment. In this case, a problem occurs in that the security is decreased.
In the system shown in FIG. 13, the hardware in the existing system is independent of the hardware in the virtual-machine execution environment. Thereby, security higher than that in either of the systems shown in FIGS. 11 and 12 can be secured. However, each of the OSs needs to parallely execute processing according to a command issued in the system and processing according to a command received from the differently configured OS. This arises a problem in that exclusive resource control is complicated.
Thus, in the conventional systems in which the individual virtual-machine execution environments, there cause the problems in that, for example, the hardware configuration and/or the software configuration is complicated, and sufficient security cannot be secured. The present invention is made in view of these problems. Accordingly, an object of the present invention is to provide a program-executing apparatus that has a simple configuration, that enables a virtual machine to execute processing at a high speed, and that exhibits high security.
Furthermore, a second object of the present invention is to provide a portable information processing apparatus at a low cost by using an existing-apparatus circuit configuration, the portable information processing apparatus being configured by including the aforementioned program-executing apparatus to thereby become capable of performing high-speed processing in the virtual-machine execution environment.